package com.cn.jdia.tas.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cn.jdia.tas.dao.T_employeeMapper;
import com.cn.jdia.tas.model.T_employee;
import com.cn.jdia.tas.service.IEmployeeService;

@Service("employeeService")
public class IEmployeeServiceImpl implements IEmployeeService {

	@Resource
	private T_employeeMapper employeeDao;
	
	@Override
	public T_employee getEmployeeById(String employeeId) { 
		return this.employeeDao.selectByPrimaryKey(employeeId);
	}

	@Override
	public T_employee getEmployeeInfoById(String employeeId) {
		return this.employeeDao.getpersoninfo(employeeId);				
	}

	@Override
	public T_employee checkpersonLogin(String name, String phone) {
		return this.employeeDao.checkPersonInfo(name, phone);
	}

	@Override
	public List<T_employee> getInterestList(List<String> idList) {
		return this.employeeDao.queryInterestList(idList);
	}

	@Override
	public List<T_employee> queryEmployeeByName(String fuzzyName) {
		return this.employeeDao.fuzzyQueryEmployee(fuzzyName);
	}

	@Override
	public int getEmployeeCount() {
		return this.employeeDao.queryCount();
	}

	@Override
	public List<T_employee> getAllEmployee() {
		return this.employeeDao.selectAll();
	}

	@Override
	public List<T_employee> getSubDeptUncheckedPerson(String deptid, String date) {
		return this.employeeDao.selectSubDeptUncheckedPerson(deptid, date);
	}

	@Override
	public List<T_employee> getParentDeptUncheckedPerson(String deptid, String date) {
		return this.employeeDao.selectParentDeptUncheckedPerson(deptid, date);
	}

}
